class CreateTrafficStatWeeks < ActiveRecord::Migration
  def change
    create_table :traffic_stat_weeks do |t|
      t.references :terminal
      t.string :key
      t.integer :year
      t.integer :week
      t.integer :flow, limit: 8

      t.timestamps
    end
    add_index :traffic_stat_weeks, :terminal_id
  end
end
